package com.hui.stock.mapper;

import com.hui.stock.pojo.domain.PermissionTreeDomain;
import com.hui.stock.pojo.entity.SysPermission;

import java.util.List;

/**
* @author ymh
* @description 针对表【sys_permission(权限表（菜单）)】的数据库操作Mapper
* @createDate 2024-11-11 16:04:25
* @Entity com.hui.stock.pojo.entity.SysPermission
*/
public interface SysPermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysPermission record);

    int insertSelective(SysPermission record);

    SysPermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysPermission record);

    int updateByPrimaryKey(SysPermission record);

    /**
     * 获取所有可用的权限
     * @return
     */
    List<SysPermission> getAllAvailablePermissions();

    /**
     * 获取目录和菜单
     * @return
     */
    List<PermissionTreeDomain> getDirectoryAndMenu();
}
